package art.client.places;

import art.shared.entities.LoginInfo;

import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceTokenizer;

public class UsersListPlace extends Place {

	private String name = null;
	private LoginInfo loginInfo = null;

	public UsersListPlace(String token, LoginInfo loginInfo) {
		this.name = token;
		this.loginInfo = loginInfo;
	}

	public String getName() {
		return name;
	}
	
	public LoginInfo getLoginInfo() {
		return loginInfo;
	}

	public static class Tokenizer implements PlaceTokenizer<UsersListPlace> {
		@Override
		public String getToken(UsersListPlace place) {
			return place.getName();
		}

		@Override
		public UsersListPlace getPlace(String token) {
			return new UsersListPlace(token, null);
		}
	}

}
